package com.linwen.javase.jvm;

/**
 * @author wlw
 * @date 2023/3/14 10:20 PM
 * -Xss160k
 */
public class TestStackOverFlow {
    private int stackLevel = 1;

    public static void main(String[] args) {
        TestStackOverFlow overFlow = new TestStackOverFlow();
        try {
            overFlow.stackLeak();
        } catch (Throwable e) {
            System.out.println(overFlow.stackLevel);
            throw e;
        }
    }
    public void stackLeak(){
        stackLevel++;
        stackLeak();
    }
}
